package com.oo.packaging_2.meetting;

/**
 * Boardroom--${description}
 *
 * @author: Jovi
 * @createTime: 2017-04-19 16:07
 **/
public class Boardroom {

    private int roomNo;

    private String name;

    private String status;

    public Boardroom(int roomNo, String name, String status) {
        this.roomNo = roomNo;
        this.name = name;
        this.status = status;
    }

    public Boardroom() {
    }

    public int getRoomNo() {
        return roomNo;
    }

    public void setRoomNo(int roomNo) {
        this.roomNo = roomNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String bespeak(String userName) {
        if ("used".equals(this.status)) {
            System.out.println(this.name + "已经被预定");
            return "success";
        } else {
            System.out.println(userName + "成功预订"+this.getName());
            return "failure";
        }
    }
}
